<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

hello : <div th:utext="${username}"></div>

用户名:<input type="text" th:value="${username}">
<br/>
性别: <input type="radio" th:checked="${sex==2}">男
<input type="radio" th:checked="${sex==1}">女

<br/>

所在城市
<select>
    <option th:selected="${city == 'xinjiang'}">新疆</option>
    <option th:selected="${city == 'changsha'}">长沙</option>
    <option th:selected="${city == 'beijing'}">北京</option>
</select>

<br/>
<h2>学习遍历</h2>
<table border="1">
    <tr>
        <th>id</th>
        <th>名字</th>
        <th>密码</th>
    </tr>
    <tr th:each="user:${users}">
        <td th:text="${user.id}"></td>
        <td th:text="${user.username}"></td>
        <td th:text="${user.pass}"></td>
    </tr>
</table>

<br/>
当前时间: <span th:text="${#dates.format(date,'yyyy-MM-dd HH:mm:ss')}"></span>
<br/>
<h2>前端发请求</h2>
<a th:href="@{/login(username='xiehao',pass='xiehao12')}">测试@{}</a>

<br/>

</body>
</html>